// 'use client'
// import {}


export default async function NewBlog() {
  // const [post, setPost] = useState<{title: string, body: string} | null>(null);
  // const fetchData = async () => {
  const response = await fetch('http://localhost:3000/api/blog')//自己定义的一个接口
  const data = await response.json()
  // setPost(data)
  // }

  return (
    <div>
      <h1>New Blog Page</h1>
      <h2>{data?.title}</h2>
      <p>{data?.body}</p>
    </div>
  )
}